using System;
using System.Collections.Generic;
using System.Text;

namespace RapidHDL
{
    public class SDRAMInterface : Component 
    {
        public NodeVector SysDataIn;
        public NodeVector SysDataOut;
        public NodeVector SysAddress;
        public NodeVector SysWrite;
        public NodeVector SysStart;
        public NodeVector SysBusy;

        public SDRAMInterface(Component poParentComponent, string psName) 
            : base(poParentComponent,psName)
        {
            SysDataIn = this.CreateNodeVector("sys_data_in", RapidHardware.Settings.SDRAMDataBits);
            SysDataOut = this.CreateNodeVector("sys_data_out", RapidHardware.Settings.SDRAMDataBits);
            SysAddress = this.CreateNodeVector("sys_addr", RapidHardware.Settings.SDRAMAddressBits);
            SysWrite = this.CreateNodeVector("sys_write", 1);
            SysStart = this.CreateNodeVector("sys_start", 1);
            SysBusy = this.CreateNodeVector("sys_busy", 1);            
        }

        public override void GenerateStructure()
        {
            /*SysAddress.Connection = RapidHardware.Structure.ExternalInterface.RamAddr;
            SysWrite.Connection = RapidHardware.Structure.ExternalInterface.RamWrite;
            SysStart.Connection = RapidHardware.Structure.ExternalInterface.RamStart;
            SysBusy.Connection = RapidHardware.Structure.ExternalInterface.RamBusy;
            SysDataIn.Connection = RapidHardware.Structure.ExternalInterface.RamDIn;
            SysDataOut.Connection = RapidHardware.Structure.ExternalInterface.RamDOut;*/
        }
    }
}
